package org.jeecg.modules.fk.service.impl;


import cn.hutool.core.util.StrUtil;
import org.jeecg.modules.fk.entity.BusinessDomain;
import org.jeecg.modules.fk.entity.dto.BusinessDomainDTO;
import org.jeecg.modules.fk.mapper.BusinessDomainMapper;
import org.jeecg.modules.fk.service.IBusinessDomainService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.ArrayList;
import java.util.List;

/**
 * @Description: business_domain
 * @Author: ZJJ
 * @Date:   2021-05-06
 * @Version: V1.0
 */
@Service
public class BusinessDomainServiceImpl extends ServiceImpl<BusinessDomainMapper, BusinessDomain> implements IBusinessDomainService {
    @Autowired
    private BusinessDomainMapper businessDomainMapper;

    @Override
    public List<BusinessDomain> queryList(BusinessDomainDTO dto) {
        return businessDomainMapper.queryList(dto);
    }

    /*@Override
    public void setRelevanceIndex(BusinessDomain record) {
            String relevanceIndex = record.getIds();
            int[] ints = StrUtil.splitToInt(relevanceIndex, ",");
            List<Integer> list = new ArrayList<>();
            for (int i = 0; i < ints.length; i++) {
                if (i == 0) {
                    record.setRelevanceIndex(ints[i]);
                }else{
                    list.add(ints[i]);
                }
            }
            record.setRelevanceIndexs(list);
    }*/
}
